package com.world.cat.model.back;

import com.world.common.generate.auto.*;
import com.world.common.model.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by gang on 2017/6/2.
 */
//这个注解控制自动生成代码之后的列表页面是否有添加、查看、删除、编辑、导出等的按钮
@QClass(actions = {QClassAction.add, QClassAction.view, QClassAction.del, QClassAction.edit, QClassAction.export})
@Entity
@Table(name = "article")
public class Article extends BaseEntity {
    @QField(name = "标题", actions = {Action.query, Action.show, Action.edit,Action.export}, queryType = QFieldQueryType.like, nullable = false)
    @Column(name = "title")
    private String title;

    @QField(name = "分类", actions = {Action.query, Action.show,Action.export}, queryType = QFieldQueryType.like, nullable = false)
    @Column(name = "category")
    private String category;

    @QField(name = "内容")
    @Column(name = "content", columnDefinition = "text")
    private String content;

    @QField(name = "是否删除")
    @Column(name = "if_del")
    private Integer ifDel = 0; //0否，1是


    //region get/set----------------------
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getIfDel() {
        return ifDel;
    }

    public void setIfDel(Integer ifDel) {
        this.ifDel = ifDel;
    }
    //endregion
}
